﻿Public Interface I_HardwareDataExchange
    Sub OpenPort()
    ReadOnly Property IsOpen() As Boolean
    Sub ClosePort()
    Sub Write(ByVal data As Byte())
    Function Read() As Byte()
    Function Read(ByVal Count As Integer) As Byte()
    Sub ClearBuffers()
    ReadOnly Property BytesToRead() As Integer
    ReadOnly Property BytesToWrite() As Integer
End Interface
Public Interface I_DataIO
    'ID
    Property ConnectionID() As String
    'Handshaking
    Property RequestPort() As Boolean
    ReadOnly Property PortAvailable() As Boolean

    'Write
    Sub Write(ByVal Data As Byte())

    'Read
    Function Read() As Byte()
    Function Read(ByVal ByteCount As Integer) As Byte()
    ReadOnly Property BytesToRead() As Integer
End Interface
Public Interface I_MuxControl
    Function OpenConnection() As String
    Function GetPort() As I_HardwareDataExchange
    Sub CloseConnection(ByVal ID As String)
End Interface
